#include <vector>
#include <iterator>

class Collection {
public:
	iterator<vector<int>> begin() {
		return data.begin();
	}

	iterator<vector<int>> end() {
		return data.end();
	}
	
	void append(int x) {
		data.push_back(x);
	}
	
	vector<int> data;
};

int main() {
	Collection vc;
	
	vc.append(1);
	vc.append(3);
	vc.append(5);
	
	for (iterator<vector<int>> i = vc.begin(); i != vc.end(); i++)
		std::cout << " " << *i;
	std::cout << "\n";
}
